<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Flex 01</title>
    <style>
        div#one {
            display: flex;
        }

        div#two {
            display: inline-flex;
        }

        div {
            border: 1px dashed;
            padding: 5px;
            background: silver;
        }

        div>* {
            border: 1px solid;
            background: yellowgreen;
        }

        div p {
            margin: 0;
        }
    </style>
</head>

<body>
    <div id="one">
        <p>flex item with
            <br> two long lines</p>
        <span>flex item</span>
        <p>flex item</p>
    </div>
    <div id="two">
        <p>flex item with
            <br> two long lines</p>
        <span>flex item</span>
        <p>flex item</p>
    </div>
</body>


</html>